﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;


namespace IHISCETeim.BLL
{
    public  class MMarketItemController
    {
        public static int MbuyDetail_Add(MbuyDetailInfo obj)
        {
            return MMarketItemDAL.MbuyDetail_Add(obj);
        }
        public static List<MbuyDetailInfo> MbuyDetail_GetByMMID(int MMID)
        {
            return CBO.FillCollection<MbuyDetailInfo>( MMarketItemDAL.MbuyDetail_GetByMMID(MMID));
        }

        public static DataTableCollection MbuyDetail_GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return MMarketItemDAL.MbuyDetail_GetPagination(whereSql, PageIndex, PageSize, Sort, ref TotalCount);
        }
        public static int Add(MMarketItemInfo obj)
        {
            return MMarketItemDAL.Add(obj);
        }
        public static bool Delete(int MMID)
        {
            return MMarketItemDAL.Delete(MMID);
        }
        public static MMarketItemInfo GetByMMID(int MMID)
        {
            return CBO.FillObject<MMarketItemInfo>( MMarketItemDAL.GetByMMID(MMID));
        }
        public static DataTable GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
           return MMarketItemDAL.GetPagination(whereSql, PageIndex,PageSize, Sort,ref TotalCount);
        }
        public static bool Update(MMarketItemInfo obj)
        {
            return MMarketItemDAL.Update(obj);
        }
        public static int MSellDetail_Add(MSellDetailInfo obj)
        {
            return MMarketItemDAL.MSellDetail_Add(obj);
        }
        public static List<MSellDetailInfo> MSellDetail_GetByMMID(int MMID)
        {
            return CBO.FillCollection<MSellDetailInfo>(MMarketItemDAL.MSellDetail_GetByMMID(MMID));
        }
        public static DataTableCollection MSellDetail_GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return MMarketItemDAL.MSellDetail_GetPagination(whereSql, PageIndex,PageSize, Sort,ref TotalCount);
        }
    }
}
